//
//  SerOrderDetailStatusCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/30.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "SerOrderDetailStatusCell.h"

@implementation SerOrderDetailStatusCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithRFModel:(CommonRefundDetailModel *)model {
    
    //状态（1：已申请，2：商家同意，3：商家拒绝，4：平台同意，5：平台拒绝，6：退款中，7：退款成功，8：退款失败）
    switch (model.refundStatus) {
        case RefundStatusType_applyed:{
            self.statusLab.text = @"已申请";
        } break;
        case RefundStatusType_storeSure:{
            self.statusLab.text = @"商家同意,待平台审核";
        } break;
        case RefundStatusType_storeRef:{
            self.statusLab.text = @"商家拒绝";
        } break;
        case RefundStatusType_platformSure:{
            self.statusLab.text = @"平台同意";
        } break;
        case RefundStatusType_platformRef:{
            self.statusLab.text = @"平台拒绝";
        } break;
        case RefundStatusType_refundIng:{
            self.statusLab.text = @"退款中";
        } break;
        case RefundStatusType_refunded:{
            self.statusLab.text = @"退款成功";
        } break;
        case RefundStatusType_refundFail:{
            self.statusLab.text = @"退款失败";
        } break;
            
        default:
            break;
    }
    
}

- (void)fillCellWithModel:(CommonOrderDetailModel *)model {
    
    ////订单类型（1：套餐，2：婚品，3：酒宴）
    switch (model.uodOrderType) {
        case 1:{
            
            switch (model.uodStatus) {
                case SerCellOrderType_payDJ:{
                    self.statusLab.text = [NSString stringWithFormat:@"请在%@前完成支付\n超时订单将自动关闭",[Utilities getTimeFromTimestamp:model.orderExpireTime]];
                } break;
                case SerCellOrderType_waitPay:{
                    self.statusLab.text = [NSString stringWithFormat:@"请在%@前完成支付\n超时订单将自动关闭",[Utilities getTimeFromTimestamp:model.orderExpireTime]];
                } break;
                case SerCellOrderType_payWK:{
                    self.statusLab.text = @"待支付尾款";
                } break;
                case SerCellOrderType_recOrder:{
                    self.statusLab.text = @"待商家接单";
                } break;
                case SerCellOrderType_service:{
                    self.statusLab.text = @"待商家服务";
                } break;
                case SerCellOrderType_serviced:{
                    self.statusLab.text = @"商家已服务";
                } break;
                case SerCellOrderType_serviceSure:{
                    self.statusLab.text = @"等待用户确认完成";
                } break;
                case SerCellOrderType_evaluate:{
                    self.statusLab.text = @"待评价";
                } break;
                case SerCellOrderType_finish:{
                    self.statusLab.text = @"服务已完成";
                } break;
                case SerCellOrderType_cancle:{
                    self.statusLab.text = @"用户已取消订单";
                } break;
                case SerCellOrderType_sysClose:{
                    self.statusLab.text = @"用户未付款，订单自动关闭";
                } break;
                default:{
                    self.statusLab.text = @"未知状态订单";
                } break;
            }
            
        } break;
        case 2:{
            
            switch (model.uodStatus) {
                case ProCellOrderType_waitPay:{
                    self.statusLab.text = [NSString stringWithFormat:@"请在%@前完成支付\n超时订单将自动关闭",[Utilities getTimeFromTimestamp:model.orderExpireTime]];
                } break;
                case ProCellOrderType_send:{
                    self.statusLab.text = @"待发货";
                } break;
                case ProCellOrderType_receive:{
                    self.statusLab.text = @"待收货";
                } break;
                case ProCellOrderType_evaluate:{
                    self.statusLab.text = @"待评价";
                } break;
                case ProCellOrderType_finish:{
                    self.statusLab.text = @"已完成";
                } break;
                case ProCellOrderType_cancle:{
                    self.statusLab.text = @"用户已取消订单";
                } break;
                case ProCellOrderType_close:{
                    self.statusLab.text = @"用户未付款，订单自动关闭";
                } break;
                default:{
                    self.statusLab.text = @"未知状态订单";
                } break;
            }
        } break;
        case 3:{

            switch (model.uodStatus) {
                case FieldCellOrderType_waitPay:{
                    self.statusLab.text = @"待付款";
                } break;
                case FieldCellOrderType_evaluate:{
                    self.statusLab.text = @"待评价";
                } break;
                case FieldCellOrderType_finish:{
                    self.statusLab.text = @"已完成";
                } break;
                case FieldCellOrderType_cancle:{
                    self.statusLab.text = @"用户已取消订单";
                } break;
                case FieldCellOrderType_sysClose:{
                    self.statusLab.text = @"系统自动取消";
                } break;
                default:{
                    self.statusLab.text = @"未知状态订单";
                } break;
            }
    } break;
        default:
            break;
    }
}
@end
